// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 检查token接口 检查token接口 POST /user/checkToken */
export async function checkTokenUsingPost(options?: { [key: string]: any }) {
  return request<dataFactory.R>('/user/checkToken', {
    method: 'POST',
    ...(options || {}),
  });
}

/** 获取用户信息接口 获取用户信息接口 GET /user/getUserInfo */
export async function getUserInfoUsingGet(options?: { [key: string]: any }) {
  return request<dataFactory.R>('/user/getUserInfo', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 登录接口 登录接口 POST /user/login */
export async function loginUsingPost(
  body: dataFactory.LoginUserDTO,
  options?: { [key: string]: any },
) {
  return request<dataFactory.R>('/user/login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 登出接口 登出接口 POST /user/logout */
export async function logoutUsingPost(options?: { [key: string]: any }) {
  return request<dataFactory.R>('/user/logout', {
    method: 'POST',
    ...(options || {}),
  });
}
